﻿// -----------------------------------------------------------------------
// <copyright file="Rotate.cs" company="Microsoft">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace ImageP
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Drawing;
    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class Rotate
    {
        public Bitmap rotateImage(Image im, string direction)
        {
            Bitmap bm = new Bitmap(im);
           
            if (direction == "left")
                bm.RotateFlip(RotateFlipType.Rotate270FlipNone);
            if (direction == "right")
                bm.RotateFlip(RotateFlipType.Rotate90FlipNone);
            return bm;
        }
      
    }
}
